<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    // 同步：执行栈
    // 异步：任务队列

    console.log(1)
    setTimeout(function () {
      console.log(2)

    }, 1000)
    console.log(3)
    console.log('------------')
    console.log(1111)
    setTimeout(function () {
      console.log(2222)

    }, 2000)
    console.log(3333)
  </script>
</body>

</html>